<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	  <title>SocialITBA Example</title>
	  
	  <style type="text/css">
	   body {
	     font-family: sans-serif;
	     font-size: 9pt;
	     color: #000;
	   }
	   a {
	     text-decoration: underline;
	     color: #000;
	   }
     a:visited {
	     text-decoration: none;
       color: #000;
     }
     div {
      margin: 5px;
      margin-left: 15px;
     }
     input {
      border: 1px solid #000;
     }
	  </style>
	  
	  <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
	  <script type="text/javascript">
	    function call(sMethod) {
	    	url = "http://localhost:8080/rest/example/";
	    	parameter = document.getElementById("theParameter").value;
	    	if(sMethod != "POST") {
	    		  url += "?parameter=" + parameter;
	    		  data = "";
		    } else {
		    	  data = "parameter=" + parameter;
			  }
	    	 $.ajax({
	    		  type: sMethod,
	    			url: url,
	          data: data,
	          success: function(data) {
	    		    document.getElementById("response").innerHTML=data;
	          }
	        });
	    }
	  </script>
	</head>
	<body>
	  <div style="text-align: center;">
	   <h1>:: SocialITBA ::</h1>
	   <h2>REST Example</h2>
	  </div>
	  
	  <h3>Request</h3>
	  <div>parameter <input type="text" id="theParameter" value="change me" /></div>
	  <h4>Methods</h4>
	  <div>&raquo;&nbsp;<a href="#" onclick="call('GET'); return false;">doGet</a></div>
	  <div>&raquo;&nbsp;<a href="#" onclick="call('POST'); return false;">doPost</a></div>
	  <div>&raquo;&nbsp;<a href="#" onclick="call('PUT'); return false;">doPut</a></div>
	  <div>&raquo;&nbsp;<a href="#" onclick="call('DELETE'); return false;">doDelete</a></div>
	  
	  <h3>Response</h3>
	  <div id="response">
	    
	  </div>
	</body>
</html>